//index.js
import chartPie from '../../components/chartPie/chartPie.js'
import { getEventInfo } from '../../utils/api.js'
var api = require('../../config/api.js');
var util = require('../../utils/util.js');

let config = {
  data: {
    canvasId: 'chart_pie',
    id: 0,
    content: '',
  },
  onLoad(e) {
    let that = this;
      util.appGet(api.ArticleDetail, { id: e.id }).then(function (res) {
        if (res.code == 0) {
          that.setData({
            id: res.data.article.id
          })
        }
      }).catch((err) => {
        console.log(err)
      });
  },
  onShow() {
    let chartP = chartPie({
      canvasId: this.data.canvasId,
      width: 630,
      height: 300
    })

    var data = {
      token: wx.getStorageSync('token'),
    };

  },
 

}
Page(config)
